package com.example.viewgrouptest;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;

public class MainActivity extends AppCompatActivity  implements View.OnClickListener,View.OnTouchListener{

    private TestLinearLayout mLayout;
    private TestButton mButton;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mLayout = (TestLinearLayout) this.findViewById(R.id.mylayout);
        mButton = (TestButton) this.findViewById(R.id.my_btn);

        mLayout.setOnTouchListener(this);
        mButton.setOnTouchListener(this);

        mLayout.setOnClickListener(this);
        mButton.setOnClickListener(this);
        
    }

    @Override
    public boolean onTouch(View v, MotionEvent event) {



        LogUtil.print("activty onTouch",v.getClass());

        return false;
    }

    @Override
    public void onClick(View v) {
        LogUtil.print("activty onClick",v.getClass());

    }
}
